<template>
  <div class="xtx-panel">
    <div class="xtx-panel-head">
      <h3>
        {{ title }}<small>{{ subTitle }}</small>
      </h3>
      <!-- 插槽 -->
      <slot name="head-right"></slot>
    </div>
    <slot name="panel-content"></slot>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: 'HomePanel'
})

interface Props {
  title: string
  subTitle?: string
}

defineProps<Props>()
</script>

<style lang="scss" scoped>
.xtx-panel {
  &-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 40px 0 40px 6px;
    margin-bottom: 2px;

    h3 {
      height: 35px;
      line-height: 35px;
      font-size: 32px;
      font-weight: 400;

      small {
        margin-left: 20px;
        color: #999;
        font-size: 16px;
      }
    }
  }
}
</style>
